export function format(time) {

    // let stamp = Number(time)
    let stamp = time.split(':')
    let Hour = Number(stamp[0]);
    var newtime = Date.parse(new Date());
    newtime = new Date(newtime).getHours()
    let date;
    if ((newtime - Hour) < 0) {
        date = '昨天'
    } else {
        date = '今天'
    }

    return date + ' ' + time;
}


// 判断各种浏览器
export function launchFullscreen(element) {
    if (element.requestFullscreen) {
        element.requestFullscreen();
    } else if (element.mozRequestFullScreen) {
        element.mozRequestFullScreen();
    } else if (element.webkitRequestFullscreen) {
        element.webkitRequestFullscreen();
    } else if (element.msRequestFullscreen) {
        element.msRequestFullscreen();
    }
}

//判断浏览器是否全屏
export function f_IsFullScreen() {
    return (document.body.scrollHeight == window.screen.height && document.body.scrollWidth == window.screen.width);
}

export function isfullScreen() {
    return !!(
        document.fullscreen ||
        document.mozFullScreen ||
        document.webkitIsFullScreen ||
        document.webkitFullScreen ||
        document.msFullScreen
    );

}
export function textFormat(list) {
    let newlsit = list.map(text => {
        let newtext = text.replace(/"/g, "");
        return newtext
    })
    return newlsit
}